{% extends 'dashboard/base.html' %}

{% block body %}
{% for data in vul_dat %}

        <div class="row">
            <div class="col-md-12">
                <div class="col-md-auto">
                    <div class="float-right">
                        <!-- Large modal -->
                         <a href="/jira/submit_jira_ticket/?summary={{data.name}}&description={{data.description}}%0a%0a%0a Vulnerable Host: {{data.host}} %0a%0a Vulnerable Port: {{data.port}} %0a%0a CVE: {{data.cve}} %0a%0a Archery URL: {SERVERIP}/networkscanners/vuln_check/?vuln_id={{data.vul_id}} &scanner=open_vas&vuln_id={{data.vul_id}}&scan_id={{data.scan_id}} "
               class="btn btn-primary btn-lg active" role="button" aria-pressed="true"> Create Jira Ticket</a>

                    </div>
                </div>
                <h1>{{ data.name }}</h1>
                <br>
                <div class="card">
                    <div class="accordion" id="accordionExample">
                        <div class="card m-b-0">
                            <div class="card-header" id="headingOne">
                                <h5 class="mb-0">
                                    <a data-toggle="collapse" data-target="#collapseOne" aria-expanded="true"
                                       aria-controls="collapseOne">
                                        <i class="m-r-5 fa fa-chevron-down" aria-hidden="true"></i>
                                        <span>Description</span>
                                    </a>
                                </h5>
                            </div>
                            <div id="collapseOne" class="collapse show" aria-labelledby="headingOne"
                                 data-parent="#accordionExample">
                                <div class="card-body">
                                     {{data.description}}

                                    <br>
                                    {{data.impact | safe}}
                                    <br>

                                </div>
                            </div>
                        </div>
                        <div class="card m-b-0 border-top">
                            <div class="card-header" id="headingTwo">
                                <h5 class="mb-0">
                                    <a class="collapsed" data-toggle="collapse" data-target="#collapseTwo"
                                       aria-expanded="false" aria-controls="collapseTwo">
                                        <i class="m-r-5 fa fa-chevron-down" aria-hidden="true"></i>
                                        <span>Instance</span>
                                    </a>
                                </h5>
                            </div>
                            <div id="collapseTwo" class="collapse" aria-labelledby="headingTwo"
                                 data-parent="#accordionExample">
                                <div class="card-body">
                                    <div class="col-md-6">
                                    <table class="table table-bordered data-table table-fixed">
                                        <thead>
                                            <tr>
                                                <td>IP</td>
                                                <td>Port</td>
                                            </tr>
                                        </thead>
                                        <tbody>
                                        <tr>
                                            <td>
                                                {{data.host}}
                                            </td>
                                            <td>
                                                {{data.port}}
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
                                        </div>
                                </div>
                            </div>
                        </div>
                        <div class="card m-b-0 border-top">
                            <div class="card-header" id="headingThree">
                                <h5 class="mb-0">
                                    <a class="collapsed" data-toggle="collapse" data-target="#collapseThree"
                                       aria-expanded="false" aria-controls="collapseThree">
                                        <i class="m-r-5 fa fa-chevron-down" aria-hidden="true"></i>
                                        <span>Solutions</span>
                                    </a>
                                </h5>
                            </div>
                            <div id="collapseThree" class="collapse" aria-labelledby="headingThree"
                                 data-parent="#accordionExample">
                                <div class="card-body">
                                     <pre>{{data.tags | safe}}<pre>
                                </div>
                            </div>
                        </div>
                        <div class="card m-b-0 border-top">
                            <div class="card-header" id="heading4">
                                <h5 class="mb-0">
                                    <a class="collapsed" data-toggle="collapse" data-target="#collapse4"
                                       aria-expanded="false" aria-controls="collapse4">
                                        <i class="m-r-5 fa fa-chevron-down" aria-hidden="true"></i>
                                        <span>Reference</span>
                                    </a>
                                </h5>
                            </div>
                            <div id="collapse4" class="collapse" aria-labelledby="heading4"
                                 data-parent="#accordionExample">
                                <div class="card-body">
                                   {% for data in xref_list %} <a href="{{data}}" target="_blank">{{data}}</a> <br> {% endfor %}
                                </div>
                            </div>
                        </div>
                        <div class="card m-b-0 border-top">
                            <div class="card-header" id="heading5">
                                <h5 class="mb-0">
                                    <a class="collapsed" data-toggle="collapse" data-target="#collapse5"
                                       aria-expanded="false" aria-controls="collapse5">
                                        <i class="m-r-5 fa fa-chevron-down" aria-hidden="true"></i>
                                        <span>CVE</span>
                                    </a>
                                </h5>
                            </div>
                            <div id="collapse5" class="collapse" aria-labelledby="heading5"
                                 data-parent="#accordionExample">
                                <div class="card-body">
                                      {% for data in cve_list %}
                        <li>{{data}}</li>
                        {% endfor %}
                                </div>
                            </div>
                        </div>
                        <div class="card m-b-0 border-top">
                            <div class="card-header" id="heading6">
                                <h5 class="mb-0">
                                    <a class="collapsed" data-toggle="collapse" data-target="#collapse6"
                                       aria-expanded="false" aria-controls="collapse6">
                                        <i class="m-r-5 fa fa-chevron-down" aria-hidden="true"></i>
                                        <span>Base Score</span>
                                    </a>
                                </h5>
                            </div>
                            <div id="collapse6" class="collapse" aria-labelledby="heading6"
                                 data-parent="#accordionExample">
                                <div class="card-body">
                                    <pre>{{data.cvss_base}}</pre>
                                </div>
                            </div>
                        </div>
                        <div class="card m-b-0 border-top">
                            <div class="card-header" id="heading7">
                                <h5 class="mb-0">
                                    <a class="collapsed" data-toggle="collapse" data-target="#collapse7"
                                       aria-expanded="false" aria-controls="collapse7">
                                        <i class="m-r-5 fa fa-chevron-down" aria-hidden="true"></i>
                                        <span>Family</span>
                                    </a>
                                </h5>
                            </div>
                            <div id="collapse7" class="collapse" aria-labelledby="heading7"
                                 data-parent="#accordionExample">
                                <div class="card-body">
                                     <pre>{{data.family}}}</pre>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

{% endfor %}

{% endblock %}